<!DOCTYPE html>
<html lang="en">

<include file="CommonSidebar:common-head"/>
<link rel="stylesheet" href="__ROOT__/Application/Home/Public/css/common.css">
<link href="__ROOT__/Application/Home/Public/css/jquery.datetimepicker.css" rel="stylesheet">
<body>

<div id="wrapper">

    <!-- Navigation -->
    <include file="CommonSidebar:common-navbar"/>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-md-12">
                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingOne">
                            <h4 class="panel-title">
                                <a role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                                    搜索栏
                                </a>
                            </h4>
                        </div>
                        <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
                             aria-labelledby="headingOne">
                            <div class="panel-body">
                                <form action="{:U('/ERPAPI/ZJKOrder')}" class="form-horizontal"
                                      method="get">

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">订单编号</label>

                                        <div class="col-sm-4">
                                            <input  name="wyy_djbh"  type="text"
                                                   class="form-control" value="{$wyy_djbh}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-sm-10 col-sm-offset-2">
                                            <button type="submit" class="btn  btn-primary">筛选</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        中间库订单
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div class="dataTable_wrapper">
                            <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                <tr>
                                    <th width="6%" style="text-align:center">交易编号</th>
                                    <th width="25%" style=" text-align:center">商品</th>
                                    <th width="7%" style=" text-align:center">商品金额</th>
                                    <th width="7%" style=" text-align:center">应付金额</th>
                                    <th width="8%" style=" text-align:center">联系人</th>
                                    <th width="11%" style="text-align:center">收货地址</th>
                                    <th width="8%" style="text-align:center">收货人手机</th>
                                    <th width="8%" style="text-align:center">创建时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="DATA" item="v" key="k">
                                    <tr class="odd gradeX">
                                        <td>{$v.wyy_djbh}</td>
                                        <td><?php
                                             foreach($v['goodsdata'] as $k1 => $v1){

                                            echo ("<label style='color: #00d6b2'>");
                                                echo $v1['spbh'];
                                               echo ("<form action='UpdateOrdersGOODSCode' method='get'>");
                                                    echo ("<input type='hidden' name='wyy_djbh'  value='".$v['wyy_djbh']."'>");
                                                    echo ("<input name='old_spbh' type='hidden' value='".$v1['spbh']."'>");
                                                    echo (" <input name='spbh'>");
                                                    echo (" <input type='submit' value='修改'>");
                                                    echo (" </form>");
                                                echo "</label>"."<br/>";
                                            echo $v1['price'] .'*'. $v1['shl'] .'=' .$v1['price'] * $v1['shl'].'元'."<br/>";
                                            if($k1 < count($v['goodsdata']) -1){
                                            echo'
                                            <hr>
                                            ';
                                            }
                                            }
                                            ?>
                                        </td>
                                        <td>{$v.wyy_AgioTotal}</td>
                                        <td>{$v.wyy_AgioTotal}</td>
                                        <td>{$v.shouhr}</td>
                                        <td>
                                            {$v.shouhdz}
                                            <label style="color: #00d6b2">{$v['danwbh']}</label>
                                            <form action="{:U('ERPAPI/UpdateOrdersYDCode')}" method="get">
                                                <input type="hidden" name="wyy_djbh" value="{$v.wyy_djbh}">
                                                <input name="old_danwbh" type="hidden" value="{$v['danwbh']}">
                                                <input name="danwbh">
                                                <input type="submit" value="修改">
                                            </form>

                                        </td>
                                        <td>{$v.tel}</td>
                                        <td>{$v.wyy_Date}</td>

                                    </tr>
                                </foreach>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->


<include file="CommonSidebar:common-script"/>
<script src="__ROOT__/Application/Home/Public/js/jquery.datetimepicker.js"></script>
<!-- DataTables JavaScript -->
<script src="__ROOT__/Application/Home/Public/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="__ROOT__/Application/Home/Public/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="__ROOT__/Application/Home/Public/dist/js/sb-admin-2.js"></script>
<!-- Page-Level Demo Scripts - Tables - Use for reference -->
<script>
    $(document).ready(function () {
        $('#dataTables-example').DataTable({
            responsive: true
        });
    });
</script>
<script type="text/javascript">
    <!--日期插件-->
    $('.datetimepicker_mask').datetimepicker({
        lang: 'ch',
        mask: '9999-19-39',
        format: 'Y-m-d',
        timepicker: false,    //关闭时间选项
        yearStart: 2000,     //设置最小年份
        yearEnd: 3050,        //设置最大年份
        todayButton: true,    //关闭选择今天按钮
        autoclose: true
    });

</script>
</body>

</html>
